﻿@page "/Dashboard" 

@implements IMenuTab<SysMenu, long>
@implements IReuseTabsPage
@inherits StudioComponentBase

@inject SysMenuService _sysMenuService
@inject IWorkflowDefinitionService WorkflowDefinitionService


<PageTitle>@TabTitle</PageTitle>

<CascadingValue Value="_dragDropManager">
    <RadzenSplitter Orientation="Orientation.Horizontal" Style="height: calc(100vh - var(--mud-appbar-height));">
        <RadzenSplitterPane Size="15%" Min="100px">
            <ActivityPicker />
        </RadzenSplitterPane>
        <RadzenSplitterPane Size="85%">
            <WorkflowDefinitionWorkspace @ref="WorkflowDefinitionWorkspace"
                                         WorkflowDefinition="@_workflowDefinition"
                                         WorkflowDefinitionVersionSelected="WorkflowDefinitionVersionSelected"
                                         WorkflowDefinitionExecuted="WorkflowDefinitionExecuted"
                                         ActivitySelected="ActivitySelected" />
        </RadzenSplitterPane>
    </RadzenSplitter>
</CascadingValue>

@code { 

    public RenderFragment GetPageTitle() =>
    @<div>
        <Icon Type="@TabIcon" /> @TabTitle
    </div>
    ;
}